#include "AMGraph.h"

int main() {
    AMGraph *graph = createGraphTool();
    int select;
    do {
        cout << "**********************************" << endl;
        cout << "   最小生成树模拟程序" << endl;
        cout << endl;
        cout << " 1.普利姆算法构造最小生成树" << endl;
        cout << " 2.克鲁斯卡尔算法构造最小生成树" << endl;
        cout << "**********************************" << endl;
        cin >> select;
        if (select == 1) {
            cout << "输入起点:";
            verType value;
            cin >> value;
            graph->primCreateTree(value);
        } else {
            graph->kruskalCreateTree();
        }
        cout << endl;
        cout << "继续?(1):";
        cin >> select;
    } while (select == 1);
    /**
     * \code
     *6 10
     *a b c d e f
     *a b 1
     *a d 5
     *a c 4
     *a f 6
     *a e 5
     *b d 5
     *d c 2
     *c f 6
     *f e 3
     *e b 6
     */
}
